The present invention relates generally to data processing systems and, more particularly, to shell extensions for an operating system.
Conventional operating systems include shells that provide user interfaces. Unfortunately, such shells are often limited in their capabilities and in the flexibility of options that they provide to an applications developer. For example, such conventional operating systems often provide shells that define context menus for each file system object. The list of menu items and associated operations provided by the shells for the context menus are often limited. Moreover, the menu items cannot be changed by applications.
Conventional shells are often additionally limited in that they predefine property sheet pages for file system objects. The property sheet pages are user interface elements that display property values for the associated file system objects and typically allow a user to change some of the displayed property values. Each property sheet page is associated with a subset of related properties for the objects.
The shells of conventional operating systems are further limited in that they provide predefined icons only for file types or objects classes. These shells do not facilitate the use of per-instance icons that are associated with each instance of an object or file. The shells of the conventional operating systems are further limited in that they only provide access to objects in the file system name spaces and provide no easy mechanism for integrating additional name spaces into the system.
Conventional operating systems are also limited as to drag-and-drop operations. In particular, applications have no ability to customize the functionality of a drop based upon a file object type. in conventional systems. Further, these conventional operating systems provide no ability to customize source objects in drag-and-drop operations.
The above-described difficulties encountered by shells of conventional operating systems are overcome by the present invention. In accordance with a first aspect of the present invention, a method is practiced in a data processing system that includes a video display and an object that has an associated context menu for specifying operations that may be performed relative to the object. The data processing system also includes an operating system with a shell that specifies predefined menu items in the context menu. In this method, a database of entries holding configuration information is provided within the data processing system. Menu items that are not predefined by the shell are registered in the database so that the menu items are included in the context menu. Each entry that is registered in this fashion includes an identification of code that is to be executed when the menu item of the object is selected by a user.
In accordance with a further aspect of the present invention, configuration information about a context menu handler is registered in database configuration information in a data processing system. A user makes a request and, in response to the request, the database is. accessed to obtain configuration information about the context. menu handler. The context menu handler is invoked to add menu items to a context menu of an object. A shell of an operating system provides at least one menu item for the context menu, but the context menu handler is used to add at least one additional menu item to the context menu for the object.
In accordance with an additional aspect of the present invention, a database of registration information is stored in a memory means in a data processing system. A representation of a per-instance icon for a file is also stored in the memory means. The representation of the per-instance icon is registered in the database of registration information along with an icon handler. The icon handler is used to find the representation of the per-instance icon. A request to display the per-instance icon is received arid, in response, the database is accessed to locate the icon handler. The icon handler then provides the per-instance icon to the operating system, which displays the per-instance icon on the video display.
In accordance with another aspect of the present invention, a database of registration information is stored in a memory means of a data processing. system. An object that has associated properties is provided within the data processing system. The data processing system includes a processing means that runs an operating system with a shell. The shell of the operating system provides at least one property sheet page for the object. A property sheet handler is registered in the database. The property sheet handler adds additional property sheet pages for the object. When a request to add at least one property sheet page for the object is received, the property sheet handler is used to add at least one property sheet page for the object.
In accordance with yet another aspect of the present invention, a data processing system includes a memory means, a video display and a processing means. The memory means holds an object and an operating system that includes a shell. The memory means also holds a registry for holding registration information. The registry holds at least one shell extension handler for extending capabilities of the shell of the operating system. The data processing system further includes a processing means for running the operating system and the shell extension handler. The shell extension handler may be a number of different types of handlers, including a context menu handler, an icon handler, a property sheet handler or a shell name space extension handler.
In accordance with another aspect of the present invention, a method is practiced in a data processing system that has a video display and an operating system that includes a file system for performing file system operations on file system objects. In this method, a copy-hook handler is provided to indicate whether a file system operation should be performed on a selected file system object. In response to a request to perform a specified file system operation on the selected file system object, the copy-hook handler is called to generate indication of whether the specified file system operation should be performed on the selected file system object. The indication that is generated by the copy-hook handler is used to determine whether to perform the specified file system operation on the selected file system object.
In accordance with a further aspect of the present invention, a video display displays a representation of a source object and a representation of a target object for a drag-and-drop operation. A data object extension handler is provided to customize the source object to determine a format for a data that is to transferred when a drag-and-drop operation is performed on the source object in response to a user using an input device. A drag-and-drop operation is initiated in response to the user using the input device. This drag-and-drop operation drags the representation of the source object to be positioned over the representation of the target object. The data object extension handler is invoked to determine the format for the data that is to be transferred from the source object in the drag-and-drop operation. The representation of the source object is dropped on the representation of the target object in response to the user using the input device to complete the drag-and-drop operation.
In accordance with yet another aspect of the present invention, a drop target extension handler is provided for customizing behavior of a target object when a drop occurs on the target object. The drag-and-drop operation is initiated on the source object in response to a user using an input device. In particular, the representation of the source object is dragged to be positioned over the representation of the target object. When a user drops the representation of the source object on the representation of the target object, the drop target extension handler is invoked to determine the behavior of the target object in response to the drop.
In accordance with an aspect of the present invention, a method is performed on a data processing system that has an operating system and classes of objects. A shell extension handler is provided for one of the classes of objects to extend the functionality of the shell relative to that class of objects. The shell extension handler is independent of the operating system and may be provided, for instance, by an application, program. The shell extension handler is invoked to extend the functionality of the shell for an object in the class of objects for which the shell extension handler is provided.
In accordance with an additional aspect of the present invention, a method is practiced in a data processing system that has a video display and an operating system. The operating system includes a name space mechanism for providing a name space of objects, including file system objects. The operating system also includes a name space viewer for viewing objects in the name space on the video display. In this method, a name space extension is provided by an application program to add non-file system objects to the name space. The name space extension is used to add these non-file system objects to the name space and the name space viewer is then used to view at least one of the non-file system objects that have been added by the name space extension.